import {defineStore} from "pinia"

export const goodsStore = defineStore("user", {
  // 状态
    state: () => ({
      goodsInfo:{
          name:'张三'
        },
        goodsInfoChange:false
    }),
    // 修改
    actions: {
      changeGoodsInfo(goodsInfo){
        this.userInfo = {...goodsInfo};
      },
      changeGoodsInfoChange(){
        this.goodsInfoChange = !this.goodsInfoChange
      }
    }
})